Re: [SQL] Newbie questions

Поиск
Список
Период
Сортировка
От Herouth Maoz
Тема Re: [SQL] Newbie questions
Дата
Msg-id l03110710b29c1f4a7f9f@[147.233.159.109]
обсуждение исходный текст
Ответ на Re: [SQL] Newbie questions  (Remigiusz Sokolowski <rems@gdansk.sprint.pl>)
Список pgsql-sql
At 15:41 +0200 on 15/12/98, Remigiusz Sokolowski wrote:


> So if they do match - I don't need to use with them some wild characters
> (* or %)? And second question: Can I use % with = operator?
> I know - simple question, but I feel now a little confused - manual
> doesn't clear it either - I thought about it, but as long as all works
> fine - I haven't needed this knowledge.

Make the distinction between a MATCH and an EQUALITY. A "match" is
comparing to a pattern, and there can be more than one text that makes the
comparison work. The '=' does not take wildcards - it is an equality test.
It tests *exactly*.

An equality test has an advantage in index usage. Case-insensitive matching
doesn't trigger indices in any case (as far as I know). Case-sensitive
matching triggers them only if the pattern is anchored to the left (That
is, in a LIKE comparison, the pattern doesn't start with % or _, and in
regular expression, it starts with a ^ followed by simple characters).

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



В списке pgsql-sql по дате отправления:

Предыдущее
От: Remigiusz Sokolowski
Дата:
Сообщение: Re: [SQL] Newbie questions
Следующее
От: David Hartwig
Дата:
Сообщение: Re: [SQL] MINUS and slow 'not in'